<template>
    <div>
        <ul>
            <li
                v-for="item in roomList"
                :key="item.roomId"
                @click="handleUser(item)"
            >
                {{ item.roomName }}
            </li>
        </ul>
        <video v-show="false" id="local-video" autoplay></video>
        <video id="remote-video" autoplay></video>
    </div>
</template>

<script>
import { handleUserClick } from '../../utils/websocket'
export default {
    computed: {
        roomList() {
            return this.$store.state.room.roomList
        },
    },
    methods: {
        handleUser(item) {
            // 查看当前房间的直播
            handleUserClick(item)
        },
    },
}
</script>

<style>
</style>